package mz.behaveas.model.spec {

	/**
	 * SpecRunListeners is a delegate reporting the state of Spec execution to console, SOS max or other. Have a look at implementations.
	 * 
	 * @author maxim.zaks@gmail.com
	 */
	public interface SpecRunListener {
		
		/**
		 * Otuput how many specification will be checked.
		 */
		function startReport(length : int) : void;
		
		/**
		 * Otuput the conclusion for all checked specifications.
		 */
		function endReport(numberOfExpectations : int, notCorrectExpectations : int, miliSeconds : Number) : void;

		/**
		 * Output the report for current specification.
		 */
		function specReport(report : String) : void;
		
		/**
		 * Output which specification will be executed.
		 */
		function runSpec(description : String, specIndex : int) : void;
		
		/**
		 * Report a failure of expectation.
		 */
		function expectationFailed(expectationIndex : int) : void;
		
		/**
		 * Report that behavioure fired an unexpected error.
		 */
		function expectationFiredError(getError : Error) : void;
		
		/**
		 * Output succesfull expectation report.
		 */
		function expectationDone(report : String) : void;
		
		/**
		 * Report which expectation is started.
		 */
		function expectationStarted(description : String, index : int) : void;

		/**
		 * Report an malformed specification.
		 */
		function specIsMalformed(report : String) : void;
	}
}
